<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  
  <button id="btn1">点击添加只因</button>
  <button id="btn2">点击删除只因</button>
  <ul>
    <li>一个只因</li>
  </ul>
  <script>
    var oBtn1 = document.getElementById("btn1")
    var oBtn2 = document.getElementById("btn2")
    var oUl = document.querySelector("ul")
    oBtn1.onclick = function(){
      var oLi = document.createElement('li')
      oLi.innerText = Math.random()
      oUl.appendChild(oLi)
    }
  </script>
</body>
</html>